#include <iostream>
using namespace std;

int main() {

    string s ;
    getline(cin, s);
    int count0 = 0, count1 = 0, count2 = 0, count3 = 0, count4=0;
    bool hasDigit = false;
    bool hasDash = false;
    int currentLength = 0;
    string maxWord = "";
    int iFirst = 0; // Индекс начала слова

    for (int i = 0; i < (int)s.size(); i++) {

            if (s[i] !=' '){
                // начало слова
                if (i == 0 || s[i-1]==' '){
                    hasDash = false;
                    iFirst = i;
                    currentLength = 0;
                    count0 ++;
                    if (( s[i] >=  'A' and s[i] <=  'Z')) {
                        count1 ++;
                    }

                }

                // Внутри слова
                currentLength ++;
                if (s[i] >=  '0' and s[i] <=  '9' ) {
                    hasDigit = true;
                }
                if (s[i]=='-') {

                    hasDash = true;
                }


                // Конец слова
                 if (i ==  (int)s.size()-1 || s[i+1]==' '){
                    if (hasDigit) {
                        count2 ++;
                        hasDigit = false;
                    }
                    string currentWord = s.substr(iFirst, currentLength);
                    if (currentWord.size() >= maxWord.size() ) {
                       maxWord = currentWord;
                    }


                    if (currentLength <= 3) {
                        count3++;

                    }
                    if (hasDash){
                        count4++;
                    }

            }
        }

    }



    if (count0 < 2){
        cout<<"Not enough data to analyze";
    }
    else {
        cout << count0 << " " << count1 << " " << count2 << " " << count3 <<" "<<count4<<  " " << maxWord.size()<<" "<<maxWord <<endl;
    }
}
